using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ACME.Northwind.DataTransfer;
using ACME.Northwind.Service.Interfaces;

namespace ACME.Northwind.MockProxy.EventArgs
{
	#region Territory EventArgs

	/// <summary>
	/// An event arguments class for object selection by primary key
	/// </summary>
	public partial class TerritoryPrimaryKeyEventArgs : System.EventArgs
	{
		/// <summary>
		/// The default constructor
		/// </summary>
		public TerritoryPrimaryKeyEventArgs(string territoryid)
		{
			this.ReturnValue = new TerritoryDTO();
		}

		/// <summary>
		/// The returned DTO item
		/// </summary>
		public TerritoryDTO ReturnValue { get; set; }
	}

	/// <summary>
	/// An event arguments class for object persistence
	/// </summary>
	public partial class TerritoryPersistEventArgs : System.EventArgs
	{
		/// <summary>
		/// The constructor for single DTO events
		/// </summary>
		public TerritoryPersistEventArgs(TerritoryDTO dto)
		{
			this.DTOList = new List<TerritoryDTO>();
			this.DTOList.Add(dto);
		}

		/// <summary>
		/// The constructor for multi DTO events
		/// </summary>
		public TerritoryPersistEventArgs(List<TerritoryDTO> list)
		{
			this.DTOList = list;
		}

		/// <summary>
		/// The list of DTO items to persist
		/// </summary>
		public List<TerritoryDTO> DTOList { get; set; }
		/// <summary>
		/// The return value for success
		/// </summary>
		public bool ReturnValue { get; set; }
	}

	/// <summary>
	/// An event arguments class for object deletion
	/// </summary>
	public partial class TerritoryDeleteEventArgs : TerritoryPersistEventArgs
	{
		/// <summary>
		/// The constructor for single DTO events
		/// </summary>
		public TerritoryDeleteEventArgs(TerritoryDTO dto) : base(dto)
		{
		}

		/// <summary>
		/// The constructor for multi DTO events
		/// </summary>
		public TerritoryDeleteEventArgs(List<TerritoryDTO> list) : base (list)
		{
		}

	}

	/// <summary>
	/// An event arguments class for object selection
	/// </summary>
	public partial class TerritoryRunSelectEventArgs : System.EventArgs
	{
		/// <summary>
		/// The default constructor
		/// </summary>
		public TerritoryRunSelectEventArgs()
		{
			this.ReturnValue = new List<TerritoryDTO>();
		}

		/// <summary>
		/// The returned list of DTO items
		/// </summary>
		public List<TerritoryDTO> ReturnValue { get; set; }
	}

	/// <summary>
	/// An event arguments class for object selection with LINQ
	/// </summary>
	public partial class TerritoryRunSelectLINQEventArgs : TerritoryRunSelectEventArgs
	{
		/// <summary>
		/// The default constructor
		/// </summary>
		public TerritoryRunSelectLINQEventArgs(string linq)
			: base()
		{
			this.LINQ = linq;
		}
		
		/// <summary>
		/// The LINQ statement to use for filtering
		/// </summary>
		public string LINQ { get; set; }
	}

	/// <summary>
	/// An event arguments class for paginated object selection
	/// </summary>
	public partial class TerritoryRunSelectPagedEventArgs : System.EventArgs
	{
		/// <summary>
		/// The default constructor
		/// </summary>
		public TerritoryRunSelectPagedEventArgs(int pageIndex, int pageSize, bool ascending, string sortColumn, string linq)			
		{
			this.ReturnValue = new PagedQueryResults<TerritoryDTO>();
			this.PageIndex = pageIndex;
			this.PageSize = pageSize;
			this.Ascending = ascending;
			this.SortColumn = sortColumn;
			this.LINQ = linq;
		}

		/// <summary>
		/// The returned list of DTO items
		/// </summary>
		public PagedQueryResults<TerritoryDTO> ReturnValue { get; set; }
		/// <summary>
		/// The LINQ statement to use for filtering
		/// </summary>
		public string LINQ { get; set; }
		/// <summary>
		/// The page index to load
		/// </summary>
		public int PageIndex { get; set; }
		/// <summary>
		/// The number of records per page
		/// </summary>
		public int PageSize { get; set; }
		/// <summary>
		/// Determines if the sort direction
		/// </summary>
		public bool Ascending { get; set; }
		/// <summary>
		/// Determines the column on which to sort
		/// </summary>
		public string SortColumn { get; set; }
	}

	/// <summary>
	/// An event arguments class for DTO specific events
	/// </summary>
	public partial class TerritoryDTOEventArgs : System.EventArgs
	{
		/// <summary>
		/// The default constructor
		/// </summary>
		public TerritoryDTOEventArgs(TerritoryDTO item)
		{
			this.DTO = item;
		}

		/// <summary>
		/// The passed in DTO item
		/// </summary>
		public TerritoryDTO DTO { get; set; }
		/// <summary>
		/// The returned DTO item
		/// </summary>
		public IDTO ReturnDTOItem { get; set; }
		/// <summary>
		/// The returned DTO list
		/// </summary>
		public List<IDTO> ReturnDTOList { get; set; }
	}

	#endregion

}
